package com.lanou.pianke.search.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;

@Document(indexName = "article",type = "article")
public class Article {
    @Id
    private String contentId;
    private Long addtime;
    private String images;
    private Integer readCount;
    private Long uid;
    private String title;
    private String text;
    private String allContent;
    private Integer likes;
    private Integer comments;
    private String uname;
    private Integer acid;

    public Article() {
    }

    public Article(Integer acid, String contentId, String images, Long uid, String title, String text, String allContent, Long addtime) {
        this.acid=acid;
        this.contentId = contentId;
        this.images = images;
        this.uid = uid;
        this.title = title;
        this.text = text;
        this.allContent=allContent;
        this.addtime=addtime;
    }

    public String getContentId() {
        return contentId;
    }

    public void setContentId(String contentId) {
        this.contentId = contentId;
    }

    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    public Integer getReadCount() {
        return readCount;
    }

    public void setReadCount(Integer readCount) {
        this.readCount = readCount;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public Integer getAcid() {
        return acid;
    }

    public void setAcid(Integer acid) {
        this.acid = acid;
    }

    public Long getAddtime() {
        return addtime;
    }

    public void setAddtime(Long addtime) {
        this.addtime = addtime;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getAllContent() {
        return allContent;
    }

    public void setAllContent(String allContent) {
        this.allContent = allContent;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getLikes() {
        return likes;
    }

    public void setLikes(Integer likes) {
        this.likes = likes;
    }

    public Integer getComments() {
        return comments;
    }

    public void setComments(Integer comments) {
        this.comments = comments;
    }

    @Override
    public String toString() {
        return "Article{" +
                "contentId='" + contentId + '\'' +
                ", addtime=" + addtime +
                ", images='" + images + '\'' +
                ", readCount=" + readCount +
                ", title='" + title + '\'' +
                ", text='" + text + '\'' +
                ", allContent='" + allContent + '\'' +
                ", likes=" + likes +
                ", comments=" + comments +
                ", uname='" + uname + '\'' +
                ", acid=" + acid +
                '}';
    }
}
